Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dry run all workbench create/update calls before submit #3301

Merged

Conversation

DaoDaoNoCode
Copy link
Member

@DaoDaoNoCode DaoDaoNoCode commented Oct 4, 2024

JIRA: RHOAIENG-1142

Description

Check all the API calls that are executed when creating/updating a workbench, make sure dry run them before truly submitting.

How Has This Been Tested?

  1. Go to the workbench creation page
  2. Create a Config Map environment variables and give it an invalid key like test key (space is not permitted in the key)
  3. Create a new PVC
  4. Create a new data connection
  5. Click submit, and you should get an error message because the key is invalid
  6. Change that key to valid like test-key
  7. Submit again, you should not get any error because the previous step dry runs everything, so it didn't create a PVC and data connection. Otherwise, you would get an error message saying xxx already exists

Test Impact

Added a unit test to verify all the networks have dry run options.

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 87.09677% with 4 lines in your changes missing coverage. Please review.

Project coverage is 84.89%. Comparing base (25e1a44) to head (01170cc).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...c/pages/projects/screens/spawner/SpawnerFooter.tsx 85.71% 2 Missing ⚠️
frontend/src/api/k8s/roleBindings.ts 50.00% 1 Missing ⚠️
frontend/src/concepts/pipelines/elyra/utils.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3301      +/-   ##
==========================================
+ Coverage   84.77%   84.89%   +0.12%     
==========================================
  Files        1309     1309              
  Lines       29292    29275      -17     
  Branches     7955     7948       -7     
==========================================
+ Hits        24831    24854      +23     
+ Misses       4461     4421      -40     
Files with missing lines Coverage Δ
frontend/src/api/errorUtils.ts 100.00% <ø> (ø)
frontend/src/api/k8s/notebooks.ts 96.87% <100.00%> (+0.04%) ⬆️
...tend/src/pages/projects/screens/spawner/service.ts 76.29% <100.00%> (+7.40%) ⬆️
frontend/src/api/k8s/roleBindings.ts 96.66% <50.00%> (ø)
frontend/src/concepts/pipelines/elyra/utils.ts 81.13% <0.00%> (+30.18%) ⬆️
...c/pages/projects/screens/spawner/SpawnerFooter.tsx 84.68% <85.71%> (+10.83%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25e1a44...01170cc. Read the comment docs.

@pnaik1
Copy link
Contributor

pnaik1 commented Oct 7, 2024

Followed this step:
Submit again, you should not get any error because the previous step dry runs everything, so it didn't create a PVC and data connection. Otherwise, you would get an error message saying xxx already exists
I still get that secret exists, Am I missing something here??

Screenshot 2024-10-07 at 6 07 33 PM

@DaoDaoNoCode
Copy link
Member Author

@pnaik1 Nice catch, it's a bug and I updated it.

Copy link
Member

@Gkrumbach07 Gkrumbach07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

this looks good. everything looks to be dry run first now

Copy link
Contributor

openshift-ci bot commented Oct 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Gkrumbach07

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit fee50c5 into opendatahub-io:main Oct 10, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants